import request from "@/util/request";
import { post } from "axios";

export default {
    // 条件查询带分页
    search(page, pageSize, data) {
        return request({
            url: `/shelf/search/${page}/${pageSize}`,
            method: "post",
            data
        })
    },

    // 保存货架
    save(url, method, data) {
        return request({
            url,
            method,
            data
        })
    },

    // 删除货架
    delete(ids) {
        return request({
            url: `/shelf/delete/${ids}`,
            method: "delete"
        })
    },

    // 获取所有货架
    findAllShelves() {
        return request({
            url: "/shelf/list",
            method: "get"
        })
    }
}
